<?xml version="1.0" encoding="UTF-8"?>
<!-- 
    Document   : results
    Created on : 23-Sep-2009, 13:34:15
    Author     : me
-->
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ice="http://www.icesoft.com/icefaces/component" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <ice:portlet>
            <ice:outputStyle href="/resources/xp-portlet.css" id="outputStyle1"/>
            <ice:form id="form1">
                <ice:panelGrid cellpadding="30px" columns="5">
                    <ice:panelGrid style="margin-left:auto; margin-right:auto;">
                        <ice:dataTable binding="#{WorkflowResultsPage.resultsTable}" columnWidths="1px, 35px, 140px, 75px, 25px, 25px, 25px" id="resultsTable"
                                       rendered="#{WorkflowResultsPage.jobsVis}" scrollHeight="300px" scrollable="true" var="item">
                            <ice:rowSelector toggleOnClick="false"/>
                            <ice:column style="text-align:center">
                                <f:facet name="header">
                                    <ice:outputText value="Job ID" style="font-weight:bold"/>
                                </f:facet>
                                <ice:outputText value="#{item.ID}"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <f:facet name="header">
                                    <ice:outputText value="Workflow" style="font-weight:bold"/>
                                </f:facet>
                                <ice:outputText value="#{item.workflow}"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <f:facet name="header">
                                    <ice:outputText value="Status" style="font-weight:bold"/>
                                </f:facet>
                                <ice:outputText value="#{item.status}"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <ice:commandButton action="#{WorkflowResultsPage.showOutputPorts}" image="/resources/icons/png/16x16/View.png" title="View results"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <ice:commandButton action="#{WorkflowResultsPage.testSAX}" image="/resources/icons/png/16x16/Download.png" title="Download results"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <ice:commandButton action="#{WorkflowResultsPage.confirmDelete}" image="/resources/icons/png/16x16/33.png" title="Delete Job"/>
                            </ice:column>
                        </ice:dataTable>
                        <br/>
                        <ice:panelGrid style="margin-left:150px; margin-right:auto;">
                            <ice:commandButton image="/resources/icons/png/Refresh.png" action="#{WorkflowResultsPage.showJobs}" style="margin-left:auto; margin-right:auto;" title="Refresh jobs" />
                        </ice:panelGrid>
                    </ice:panelGrid>
                    <table cellpadding="50">
                        <tr>
                            <td>     </td>
                            <td></td>
                        </tr>
                    </table>
                    <!-- <ice:panelGrid>
                        <ice:dataTable binding="#{WorkflowResultsPage.outputPortsTable}" columnWidths="125px, 25px" rendered="#{WorkflowResultsPage.outsVis}"
                                       scrollHeight="350px" scrollable="true" var="item2">
                            <ice:column>
                                <f:facet name="header">
                                    <ice:outputText binding="#{WorkflowResultsPage.outs}" style="font-weight:bold"/>
                                </f:facet>
                                <ice:commandLink value="#{item2}" action="#{WorkflowResultsPage.showOutputs}"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <f:facet name="header">
                                    <ice:commandButton image="/resources/icons/png/16x16/Error.png" title="error"/>
                                </f:facet>
                                <h:graphicImage title="Error message" url="/resources/icons/png/16x16/Error.png"/>
                            </ice:column>
                        </ice:dataTable>
                    </ice:panelGrid>
                    <table cellpadding="50">
                        <tr>
                            <td>     </td>
                            <td></td>
                        </tr>
                    </table>
                    <ice:panelGrid>
                        <ice:dataTable binding="#{WorkflowResultsPage.outputsTable}" columnWidths="135px, 25px" rendered="#{WorkflowResultsPage.outsVis}"
                                       scrollHeight="350px" scrollable="true" var="item1">
                            <ice:column>
                                <f:facet name="header">
                                    <ice:outputText value="out1" style="font-weight:bold"/>
                                </f:facet>
                                <ice:outputText value="#{item1.value}" escape="false"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <f:facet name="header">
                                    <ice:commandButton image="#{WorkflowResultsPage.errorsIcon}" title="#{WorkflowResultsPage.errorsMessage}"/>
                                </f:facet>
                                <h:graphicImage rendered="#{item1.containsError}" title="Error message" url="/resources/icons/png/16x16/Error.png"/>
                            </ice:column>
                        </ice:dataTable>
                    </ice:panelGrid> -->

                    <ice:panelTabSet binding="#{WorkflowResultsPage.resultsTabSet}" title="Job 1" id="resultsTabSet" selectedIndex="0" rendered="#{WorkflowResultsPage.outsVis}">
                        <ice:dataTable binding="#{WorkflowResultsPage.portResultsTable}" var="varItem" >
                            <ice:column>
                                <ice:outputText value="#{varItem}" />
                            </ice:column>
                        </ice:dataTable>
                    </ice:panelTabSet>
                    <br/>

                </ice:panelGrid>


                <ice:panelPopup draggable="false" id="modalPnlPop" modal="true" visible="#{WorkflowResultsPage.popupVis}">
                    <f:facet name="header">
                        <ice:panelGroup>
                            <ice:outputText value="Warning!"/>
                        </ice:panelGroup>
                    </f:facet>
                    <f:facet name="body">
                        <ice:panelGroup styleClass="icePnlPopBody">
                            <ice:outputText style="font-weight:bold; font-size:13px; font-color:#333333" value="Are you sure you want to delete this job?"/>
                            <br/>
                            <br/>
                            <ice:commandButton action="#{WorkflowResultsPage.deleteJob}" id="modalPnlCloseButton" type="submit" value="OK"/>
                            <ice:outputText value="   "/>
                            <ice:commandButton action="#{WorkflowResultsPage.cancelDelete}" type="submit" value="Cancel"/>
                        </ice:panelGroup>
                    </f:facet>
                </ice:panelPopup>
            </ice:form>
        </ice:portlet>
    </f:view>
</jsp:root>
